I have a RPC-procedure ('terminate_server_1()') on serverside to unregister und terminate the server by RPC-call from clientside.
void* terminate_server_1 () {
svc_unreg(PROG_NUM, VERS_NUM); /*unregister-call in TIRPC (Solaris 2.4) */
exit(0); (+++)
}
On clientside:
...
terminate_server_1();
clnt_destroy(cl);
exit(0);
My problem is now: The 'exit'-call (line +++) in the server-procedure 'terminate...' never returns, and therefore 'terminate_server_1' never returns and therefore client hangs after calling 'terminate...'! What must i do, so that server exits gracefully and nevertheless client doesn`t hang and gets a acknowledgement of correkt server-terminating!